import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm'
import { BaseEntity } from './BaseEntity'
import { DateEntity } from './DateEntity'

@Entity({ name: 't_user' })
export class User extends BaseEntity {
  @Column({ name: 'user_name', type: 'text', comment: '用户名' })
  userName: string

  @Column({ name: 'password', type: 'text', comment: '密码' })
  password: string

  @Column({ name: 'phone', type: 'text', unique: true, comment: '联系电话', nullable: true })
  phone: string

  @Column({ name: 'email', type: 'text', comment: '联系电话' })
  email: string

  @Column({ name: 'sex', type: 'integer', comment: '性别' })
  sex: number

  @Column((type) => DateEntity)
  '': DateEntity
}
